﻿<phone:PhoneApplicationPage xmlns:my="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps"  
    x:Class="AOuSuisJeWP7.NewEnigma"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="696" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">

    <Grid x:Name="LayoutRoot" Background="Transparent">

        <controls:Pivot x:Name="PivotContainer"  Title="Où Suis-je" SelectionChanged="Pivot_SelectionChanged" Margin="0,0,0,54">

            <controls:PivotItem x:Name="picItem" Header="Photo">
                <Grid>
                    <Image x:Name="MainImage" Stretch="Uniform" HorizontalAlignment="Left" 
                        VerticalAlignment="Top" Source="{Binding CapturedImage}" />
                    <!--<TextBlock Canvas.Left="8" Canvas.Top="500" Height="69" Name="textStatus" Width="440" 
                        Text="{Binding StatusText}"/>-->
                </Grid>
            </controls:PivotItem>

            <controls:PivotItem x:Name="infoItem" Header="Informations">
                <Grid>
                    <TextBlock Height="57" HorizontalAlignment="Left" Margin="6,6,0,0" Text="Titre" 
                               VerticalAlignment="Top" Width="444" FontFamily="Segoe WP SemiLight" 
                               FontSize="40" />
                    
                    <TextBox Height="72" Margin="0,69,0,0" x:Name="TitleTxtBox"
                        VerticalAlignment="Top" Text="{Binding Path=Title, Mode=TwoWay}"/>
                    
                    <TextBlock FontFamily="Segoe WP SemiLight" FontSize="40" Height="57" HorizontalAlignment="Left" 
                        Margin="6,147,0,0" Name="DescriptionLabel" Text="Description" VerticalAlignment="Top" Width="444" />

                    <TextBox Height="310" Margin="0,210,0,0"  x:Name="DescripionTxtBox"
                        VerticalAlignment="Top" Text="{Binding Path=Description, Mode=TwoWay}"/>

                </Grid>
            </controls:PivotItem>

            <controls:PivotItem x:Name="geoItem" Header="Localisation">
                <Grid>
                    <my:Map x:Name="Map" Center="{Binding Position}" CredentialsProvider="{Binding BingCredentials}"
                        Visibility="{Binding MapVisibility}">
                        <my:MapLayer x:Name="MapLayer">
                            <my:Pushpin Location="{Binding Path=Position, Mode=TwoWay}" Content="Ma position" x:Name="MyPp" Visibility="Collapsed"></my:Pushpin>
                        </my:MapLayer>

                    </my:Map>
                </Grid>
            </controls:PivotItem>
        </controls:Pivot>

        <TextBlock Name="textStatus" Text="{Binding StatusText}" Margin="12,648,12,0" />
        
        <ProgressBar Height="10" Name="progressBar1" Visibility="{Binding ProgressBarVisibility}" 
            Margin="12,142,12,544" IsIndeterminate="True" />
    </Grid>
    
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>
